<%-- 
    Document   : register
    Created on : May 2, 2012, 9:37:58 AM
    Author     : Jayson Kiong
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel = "stylesheet" type = "text/css" href = "quicklendstyle.css"/>
        <script src="gen_validatorv4.js" type="text/javascript"></script>
        
        <title>Register</title>
    </head>
    <body>
        <form id="regform" action="/Quicklend/RegValidation" method="POST">
        <div id="contentbg" style="position: absolute; top:8px; left:450px;">
            <img src="images/registrationbg.png" alt=""></img>
            <div id="contenttitle" style="position: absolute; top:10px; left:13px;">
            Register
            </div>
            
            <table id="registercontent"style="position:absolute; top:60px; left:30px; filter:alpha(opacity=100)">
            
                <tr>
                    <td>Last Name:</td><td><input type="text" name="lastname"/><div id='regform_lastname_errorloc' style="color:#FF0000"></div></td>
                </tr>
                <tr>
                    <td>First Name:</td><td><input type="text" name="firstname"><div id='regform_firstname_errorloc' style="color:#FF0000"></div></td>
                </tr>
                <tr>
                    <td>Middle Name:</td><td><input type="text" name="middlename"><div id='regform_middlename_errorloc' style="color:#FF0000"></div></td>
                </tr>
                <tr>
                    <td>Contact No.</td><td><input type="text" name="contact"><div id='regform_contact_errorloc' style="color:#FF0000"></div></td>
                </tr>                
                <tr>
                    <td>Username:</td><td><input type="text" name="username"/><div id='regform_username_errorloc' style="color:#FF0000"></div></td>
                </tr>
                <tr>
                    <td>Password:</td><td><input type="password" name="password"><div id='regform_password_errorloc' style="color:#FF0000"></div></td>
                </tr>
                <tr>
                    <td>Re-type Password:</td><td><input type="password" name="retypepassword"><div id='regform_retypepassword_errorloc' style="color:#FF0000"></div></td>
                </tr>
                <tr>
                    <td>Secret Question 1:</td><td><select name="secretquestion1"><option>What's your mother's middle name?</option><option>Who is your childhood superhero?</option><option>What's the name of your elementary school?</option><option>Who is your first kissed?</option><option>Where did your parents meet?</option><option>What's the name of your first pet?</option><option>What's your father's middle name?</option><option>What's the name of your bestfriend?</option><option>Where did you meet your spouse?</option><option>What's your nickname?</option></select></td>
                </tr>
                <tr>
                    <td>Answer 1:</td><td><input type="password" name="answer1"><div id='regform_answer1_errorloc' style="color:#FF0000"></div></td>
                </tr>
                <tr>
                    <td>Secret Question 2:</td><td><select name="secretquestion2"><option>What's your mother's middle name?</option><option>Who is your childhood superhero?</option><option>What's the name of your elementary school?</option><option>Who is your first kissed?</option><option>Where did your parents meet?</option><option>What's the name of your first pet?</option><option>What's your father's middle name?</option><option>What's the name of your bestfriend?</option><option>Where did you meet your spouse?</option><option>What's your nickname?</option></select><div id='regform_secretquestion2_errorloc' style="color:#FF0000"></td>
                </tr>
                <tr>
                    <td>Answer 2:</td><td><input type="password" name="answer2"><div id='regform_answer2_errorloc' style="color:#FF0000"></div></td>
                </tr>
                <tr>
                    <td></br></td>
                </tr>
                <tr>
                    
                    <td>*All fields are required</td>
                   
                </tr>
            </table>
             <div id="registerfunction" style="position:absolute;top:650px;left:210px;">
                    <input type="image" src="images/registerbtn.png"  size="13" style="position:absolute; left:0px"/></a>
                    <a href="index.jsp" class="cancelbtn" name="cancelbtn"  size="13" style="position:absolute; left:110px"/></a>     
               
             </div>
            
            
        </div>
        
    </body>
    </form>
    <script type="text/javascript">
         var frmvalidator  = new Validator("regform");
         frmvalidator.addValidation("firstname","req","Please enter your First Name");
         frmvalidator.addValidation("firstname","alpha_s","Invalid First Name");
         frmvalidator.addValidation("lastname","req","Please enter your Last Name");
         frmvalidator.addValidation("lastname","alpha_s","Invalid Last Name");
         frmvalidator.addValidation("middlename","req","Please enter your Middle Name");
         frmvalidator.addValidation("middlename","alpha_s","Invalid Middle Name");
         frmvalidator.addValidation("username","req","Please enter your User Name");
         frmvalidator.addValidation("password","req","Please enter your Password");
         frmvalidator.addValidation("contact","req","Please enter your Contact No.");
         frmvalidator.addValidation("contact","num","Invalid contact no.");
         frmvalidator.addValidation("answer1","req","Please enter your answer to the secret question 1");
         frmvalidator.addValidation("answer2","req","Please enter your answer to the secret question 2");
         frmvalidator.addValidation("retypepassword","eqelmnt=password","The confirmed password is not same as password");
         frmvalidator.addValidation("secretquestion2","neelmnt=secretquestion1","The secret questions should not be the same");
         frmvalidator.EnableOnPageErrorDisplay();
         frmvalidator.EnableMsgsTogether();
    </script>
</html>
